-- GENERATED SPELL FOR [Chromatic Whelp] --


function spell0_10442(pUnit, Event) --@Fireball Volley,n/a--
pUnit:FullCastSpellOnTarget(16250,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10442', 3000, 1)
end

function spell1_10442(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(16249,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10442', 7000, 1)
end

function spell2_10442(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(12167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10442', 3000, 1)
end

function Sorts_10442(pUnit, Event)
local choix_sorts_10442 = math.random(0, 2)
if choix_sorts_10442 == 0 then
pUnit:RegisterEvent('spell0_10442', 1, 1)
end
if choix_sorts_10442 == 1 then
pUnit:RegisterEvent('spell1_10442', 1, 1)
end
if choix_sorts_10442 == 2 then
pUnit:RegisterEvent('spell2_10442', 1, 1)
end
end

function mob10442_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10442', math.random(1500, 3000), 1)
end

function mob10442_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10442_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10442_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10442, 1, 'mob10442_Action')
RegisterUnitEvent(10442, 2, 'mob10442_Leave')
RegisterUnitEvent(10442, 3, 'mob10442_Kill')
RegisterUnitEvent(10442, 4, 'mob10442_Die')
